<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .one{
            float: left;
            width: 234px;
            height: 300px;
            background: url("img/1.jpg") no-repeat left;
            transition: all 1s ease-in-out;
            margin-right: 3px;
        }

        .two{
            float: left;
            width: 234px;
            height: 300px;
            text-align: center;
            position: relative;
            overflow: hidden;
            transition: all 1s ease-in-out;
            margin-right: 3px;
        }

        .two span{
            position: absolute;
            width: 100%;
            height: 30px;
            left: 0;
            bottom: -30px;
            transition: all 1s ease-in-out;
        }

        .one:hover,.two:hover {
            margin-top: -2px;
            box-shadow: 1px 1px 3px 1px #333;
        }
        .two:hover span{
            background-color: pink;
            bottom: 0px;
        }
    </style>
</head>
<body>
    <div class="one"></div>
    <div class="two">
        <img src="img/2.jpg" alt="">
        <span></span>
    </div>
    <div class="two">
        <img src="img/2.jpg" alt="">
        <span></span>
    </div>
</body>
</html>